﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace Zeus.Mvc.ConsoleHost.Test.Controllers
{
    using Arguments;
    using Zeus.Mvc.Controllers;
    using Zeus.Mvc.Results;
    public class ZeusPowerController : ZeusController
    {
        [HttpGet]
        [Route("api/power/show/{content}")]
        public async Task<IActionResult> PowerShow([FromRoute]string content)
        {
            return new ZeusResult(new
            {
                content,
                time = DateTime.Now,
            });
        }

        [Route("api/power/show/action")]
        public async Task<IActionResult> PowerShowAction([FromBody]ArguPowerShow arguPowerShow)
        {
            return new ZeusResult(arguPowerShow);
        }

        [Route("api/performance/test")]
        public async Task<IActionResult> Performance()
        {
            return new ZeusResult(new
            {
                code = 200,
                Message = DateTime.Now.ToString("yyyy-MM-dd")
            });
        }
    }
}
